package com.qfedu.biz.impl;

import com.qfedu.biz.AddressBiz;
import com.qfedu.entity.AddressEntity;
import com.qfedu.mapper.AddressPojoMapper;
import com.qfedu.pojo.AddressPojo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AddressBizimpl implements AddressBiz {
    @Autowired
    private AddressPojoMapper addressPojoMapper;
    @Override
    public List<AddressEntity> queryAddressByCid(AddressEntity addressEntity) {
        List<AddressEntity> addressEntities = addressPojoMapper.queryAddressByCid(addressEntity);
        return addressEntities;
    }

    @Override
    public Boolean insertAddress(AddressEntity addressEntity) {
        Boolean aBoolean = addressPojoMapper.insertAddress(addressEntity);
        return aBoolean;
    }

    @Override
    public AddressEntity queryAdById(int addressid) {
        AddressEntity addressEntity = addressPojoMapper.queryAddress(addressid);
        return addressEntity;
    }

    @Override
    public Boolean updateAddress(AddressEntity addressEntity) {
        Boolean aBoolean = addressPojoMapper.updateAddress(addressEntity);
        return aBoolean;
    }
}
